class BiTreeNode:
    def __init__(self,data):
        self.data = data
        self.lchild = None # 左孩子 left child
        self.rchild = None


# 前序遍历 先访问左节点，再访问右节点 依次递归。
def pre_order(root):
    if root:
        print(root.data,end=",")
        pre_order(root.lchild)
        pre_order(root.rchild)


def in_order(root):
    if root:
        pre_order(root.lchild)
        print(root.data,)
        pre_order(root.rchild)

def post_order(root):
    if root:
        pre_order(root.lchild)
        pre_order(root.rchild)
        print(root.data, )